//
//  AVOSUserManger.h
//  FunnyVideo
//
//  Created by 李鑫 on 15/10/19.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//

#import <Foundation/Foundation.h>

@class AVUser;
@interface AVOSUserManger : NSObject



@property (nonatomic,readonly) AVUser   *user;

+ (AVOSUserManger *)sharedManger;

+ (void)loginWithUsername:(NSString *)user Psw:(NSString *)psw completion:(void (^)(AVUser *,BOOL succ,NSError *error))loginCompletion;

+ (void)loginWithMobile:(NSString *)phone Psw:(NSString *)psw completion:(void(^)(AVUser *user ,BOOL succ,NSError *error))loginCompletion;

+ (void)getUserFaceByUserName:(NSString *)userName completion:(void(^)(UIImage *head,NSError *error))completion;

+ (void)registWithMobile:(NSString *)phone Psw:(NSString *)psw smsCode:(NSString *)smsCode completion:(void(^)(AVUser *user ,BOOL succ,NSError *error))loginCompletion;
- (AVUser *)getLoginUser;
- (void)setLoginUser:(AVUser *)user;

- (NSString *)getSession;
- (NSString *)getUserName;
- (UIImage *)getUserFace;

+ (void)updateUser;
@end
